/**
 * 
 */
package sistema.submissao.filters;

import java.io.File;
import java.util.StringTokenizer;

/**
 * @author Thiago Emmanuel Pereira da Cunha Silva, thiago.manel@gmail.com
 * @since 20/04/2006
 */
public class JavaFilter implements Filter {

	public String parametroCompilacao(String sourcePath) {
		String separator = File.separator;
		StringTokenizer tokenizer = new StringTokenizer(sourcePath, separator);
		String token = tokenizer.nextToken();
		while (tokenizer.hasMoreTokens()){
			token = tokenizer.nextToken();
		}
		return token;
	}

	public String parametroExecucao(String sourcePath) {
		return (new StringTokenizer(parametroCompilacao(sourcePath), ".").nextToken());
	}

}
